function ddip(e0) {
    e1 = r13(e0.toString());
    e2 = xx(e1);
    e3 = e2.toString().substr(10);
    l3 = e3.length;
    e4 = e3.substr(0, l3 - 10);
    return e4
}

var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
      , a256 = ''
      , r64 = [256]
      , r256 = [256]
      , i = 0;
while (i < 256) {
    var c = String.fromCharCode(i);
    a256 += c;
    r256[i] = i;
    r64[i] = b64.indexOf(c);
    ++i;
}

function code(s, discard, alpha, beta, w1, w2) {
    s = String(s);
    var buffer = 0
        , i = 0
        , length = s.length
        , result = ''
        , bitsInBuffer = 0;
    while (i < length) {
        var c = s.charCodeAt(i);
        c = c < 256 ? alpha[c] : -1;
        buffer = (buffer << w1) + c;
        bitsInBuffer += w1;
        while (bitsInBuffer >= w2) {
            bitsInBuffer -= w2;
            var tmp = buffer >> bitsInBuffer;
            result += beta.charAt(tmp);
            buffer ^= tmp << bitsInBuffer;
        }
        ++i;
    }
    if (!discard && bitsInBuffer > 0)
        result += beta.charAt(buffer << (w2 - bitsInBuffer));
    return result;
}

function xx(coded, utf8decode) {
    coded = String(coded).split('=');
    var i = coded.length;
    do {
        --i;
        coded[i] = code(coded[i], true, r64, a256, 6, 8);
    } while (i > 0);
    coded = coded.join('');
    return [xc(coded)]
    // return Plugin.raw === false || Plugin.utf8decode || utf8decode ? UTF8.decode(coded) : coded;
}

function xc(strUtf) {
            var strUni = strUtf.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g, function(c) {
                var cc = ((c.charCodeAt(0) & 0x0f) << 12) | ((c.charCodeAt(1) & 0x3f) << 6) | (c.charCodeAt(2) & 0x3f);
                return String.fromCharCode(cc);
            }).replace(/[\u00c0-\u00df][\u0080-\u00bf]/g, function(c) {
                var cc = (c.charCodeAt(0) & 0x1f) << 6 | c.charCodeAt(1) & 0x3f;
                return String.fromCharCode(cc);
            });
            return strUni;
        }
function r13(s) {
    var b = [], c, i = s.length, a = 'a'.charCodeAt(), z = a + 26, A = 'A'.charCodeAt(), Z = A + 26;
    while (i--) {
        c = s.charCodeAt(i);
        if (c >= a && c < z) {
            b[i] = rot(c, a, 13)
        } else if (c >= A && c < Z) {
            b[i] = rot(c, A, 13)
        } else {
            b[i] = s.charAt(i)
        }
    }
    return b.join('')
}

function rot(t, u, v) {
    return String.fromCharCode(((t - u + v) % (v * 2)) + u)
}

console.log(ddip('ZGLlZwDmZQR2ZwR2AF4lZwHhZmLhAwxkAwZ4AQp4BQNj'))



